package com.forum.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.springframework.stereotype.Component;

import java.time.*;
@Component
public class Comments {
    @TableId(type = IdType.AUTO)
    private Integer id; // 评论ID
    private Integer articleId; // 文章ID
    private Integer userId; // 评论用户ID
    private Integer parentId; // 父评论ID（为空为一级评论）
    private String content; // 评论内容
    private Integer likeCount; // 点赞数
    private LocalDateTime createdAt; // 评论时间
    private LocalDateTime deletedAt; // 删除时间（软删除）

    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
    public Integer getArticleId() { return articleId; }
    public void setArticleId(Integer articleId) { this.articleId = articleId; }
    public Integer getUserId() { return userId; }
    public void setUserId(Integer userId) { this.userId = userId; }
    public Integer getParentId() { return parentId; }
    public void setParentId(Integer parentId) { this.parentId = parentId; }
    public String getContent() { return content; }
    public void setContent(String content) { this.content = content; }
    public Integer getLikeCount() { return likeCount; }
    public void setLikeCount(Integer likeCount) { this.likeCount = likeCount; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
    public LocalDateTime getDeletedAt() { return deletedAt; }
    public void setDeletedAt(LocalDateTime deletedAt) { this.deletedAt = deletedAt; }
}
